package com.zzyl.nursing.service;

import java.util.List;

import com.zzyl.nursing.domain.DayData;
import com.zzyl.nursing.domain.FamilyMember;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.nursing.dto.FamilyMemberDto;
import com.zzyl.nursing.dto.HealthyDataDto;
import com.zzyl.nursing.dto.UserLoginRequestDto;
import com.zzyl.nursing.vo.FamilyElderVo;
import com.zzyl.nursing.vo.FamilyMemberElderVo;
import com.zzyl.nursing.vo.HealthyDataVo;
import com.zzyl.nursing.vo.LoginVo;

import javax.servlet.http.HttpServletRequest;

/**
 * 老人家属Service接口
 * 
 * @author 陈舜涛
 * @date 2025-07-31
 */
public interface IFamilyMemberService extends IService<FamilyMember>
{
    /**
     * 查询老人家属
     * 
     * @param id 老人家属主键
     * @return 老人家属
     */
    public FamilyMember selectFamilyMemberById(Long id);

    /**
     * 查询家人列表
     * @return 家人列表集合
     */
    public List<FamilyMemberElderVo> selectFamilyMemberList();

    /**
     * 新增老人家属
     * 
     * @param familyMemberDto 老人家属
     * @return 结果
     */
    public void add(FamilyMemberDto familyMemberDto, HttpServletRequest request) ;

    /**
     * 修改老人家属
     * 
     * @param familyMember 老人家属
     * @return 结果
     */
    public int updateFamilyMember(FamilyMember familyMember);

    /**
     * 批量删除老人家属
     * 
     * @param ids 需要删除的老人家属主键集合
     * @return 结果
     */
    public int deleteFamilyMemberByIds(Long[] ids);

    /**
     * 解绑家人
     * 
     * @param id 老人家属主键
     * @return 结果
     */
    public void deleteFamilyMemberById(Long id);

    LoginVo login(UserLoginRequestDto userLoginRequestDto);


    List<FamilyElderVo> listByPage(Integer pageNum, Integer pageSize, HttpServletRequest  request);

    List<HealthyDataVo> QueryDevicePropertyStatus(HealthyDataDto healthyDataDto);


    List<DayData> queryDeviceDataListByDay(String functionId, Long startTime, Long endTime, String iotId);


    List<DayData> queryDeviceDataListByWeek(String functionId, Long startTime, Long endTime, String iotId);
}
